package com.jxb.demo.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @desc 消息监听者
 */
@Component
public class MsgEventListener implements ApplicationListener<MsgEvent> {

    private static Logger logger = LoggerFactory.getLogger(MsgEventListener.class);

    @Override
    public void onApplicationEvent(MsgEvent msgEvent) {
        logger.info("####接收信息：msg:{},msgId:{}",msgEvent.getMsg(),msgEvent.getMsgId());
    }
}
